package it.gommonauti.patenti.dao.factory;

import it.gommonauti.patenti.dao.MainQuestionDAO;

/**
 * @author Francesco Stallone ( f.stallone73@gmail.com ).
 * 
 * Data Access Object factoy according to factory pattern. 
 */
public abstract class DAOFactory {

	  // List of DAO types supported by the factory
	  public static final int H2_DB = 1;
	  
	  public abstract MainQuestionDAO getMainQuestionDAO();
	  
	  public static DAOFactory getDAOFactory(int whichFactory) {
	  
	    switch (whichFactory) {
	      case H2_DB: 
	          return new H2DbDAOFactory();
	      default           : 
	          return null;
	    }
	  }
	}